<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
  <%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<s:head />
<style type="text/css">
@import url(page_style.css);
</style>
<script type="text/javascript">
function del()
{
  if(window.confirm("do you really want to delete it?"))
  {
  return true;
  }
  return false;
}

</script>
</head>
<body>
<h1>User List</h1>
	<div class="content">
	<table class="userTable" cellpadding="5px">
		<tr class="even">
		    <th>ID</th>
			<th>FIRSTNAME</th>
			<th>LASTNAME</th>
			<th>AGE</th>
			<th>OPERATION</th>
			<th>OPERATION</th>
		</tr>
		<s:iterator value="#request.list" status="#userStatus" id="us">
			<tr
				class="<s:if test="#userStatus.odd == true ">odd</s:if><s:else>even</s:else>">
				<td><s:property value="#us.id"/></td>
				<td><s:property value="#us.firstname" /></td>
				<td><s:property value="#us.lastname" /></td>
				<td><s:property value="#us.age" /></td>
				<td><s:a href="deleteUser.action?user.id=%{#us.id}" onclick="return del();">Delete</s:a>
</td>
<td><s:a href="updatePUser.action?user.id=%{#us.id}">Update</s:a>
</td>
			</tr>
		</s:iterator>
	</table>
	</div>
</body>
</html>